package Entities;
// Generated Jun 21, 2009 1:07:04 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Enquetes generated by hbm2java
 */
@Entity
@Table(name="enquetes"
    ,catalog="pdlv2"
)
public class Enquetes  implements java.io.Serializable {


     private Integer id;
     private Cursussen cursussen;
     private String naam;
     private Integer aantalVragen;
     private Set<EnquetteVragen> enquetteVragens = new HashSet<EnquetteVragen>(0);

     /**
      *
      */
     public Enquetes() {
    }

	
    /**
     *
     * @param cursussen
     * @param naam
     */
    public Enquetes(Cursussen cursussen, String naam) {
        this.cursussen = cursussen;
        this.naam = naam;
    }
    /**
     *
     * @param cursussen
     * @param naam
     * @param aantalVragen
     * @param enquetteVragens
     */
    public Enquetes(Cursussen cursussen, String naam, Integer aantalVragen, Set<EnquetteVragen> enquetteVragens) {
       this.cursussen = cursussen;
       this.naam = naam;
       this.aantalVragen = aantalVragen;
       this.enquetteVragens = enquetteVragens;
    }
   
    /**
     *
     * @return
     */
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)
    public Integer getId() {
        return this.id;
    }
    
    /**
     *
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }
    /**
     *
     * @return
     */
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="cursus_id", nullable=false)
    public Cursussen getCursussen() {
        return this.cursussen;
    }
    
/**
 *
 * @param cursussen
 */
public void setCursussen(Cursussen cursussen) {
        this.cursussen = cursussen;
    }
    
    /**
     *
     * @return
     */
    @Column(name="naam", nullable=false, length=30)
    public String getNaam() {
        return this.naam;
    }
    
    /**
     *
     * @param naam
     */
    public void setNaam(String naam) {
        this.naam = naam;
    }
    
    /**
     *
     * @return
     */
    @Column(name="aantal_vragen")
    public Integer getAantalVragen() {
        return this.aantalVragen;
    }
    
    /**
     *
     * @param aantalVragen
     */
    public void setAantalVragen(Integer aantalVragen) {
        this.aantalVragen = aantalVragen;
    }
    /**
     *
     * @return
     */
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="enquetes")
    public Set<EnquetteVragen> getEnquetteVragens() {
        return this.enquetteVragens;
    }
    
/**
 *
 * @param enquetteVragens
 */
public void setEnquetteVragens(Set<EnquetteVragen> enquetteVragens) {
        this.enquetteVragens = enquetteVragens;
    }




}


